local CONFIG_VTRACE = false 
local CONFIG_ISA64 = true
set_project("multiplier")
add_rules("mode.debug", "mode.release", "mode.check")
add_requires("verilator")
target("Top")
    add_rules("verilator.binary")
    set_toolchains("@verilator")
    add_files("vsrc/*.sv")
    add_files("csrc/*.cpp")
    if CONFIG_ISA64 then add_defines("CONFIG_ISA64") end
    -- set top module
    add_values("verilator.flags", "--top-module", "WallaceMultiplier")
    -- set trace
    if CONFIG_VTRACE then add_values("verilator.flags", "--trace") end
    if CONFIG_VTRACE then add_defines("CONFIG_VTRACE") end
    -- set include directories
    add_values("verilator.flags", "-y", "vsrc") 
    -- set other flags
    add_values("verilator.flags", "--noassert")
